/*
 * @Author: your name
 * @Date: 2020-07-08 10:20:10
 * @LastEditTime: 2020-07-10 10:30:12
 * @LastEditors: 範遠茂
 * @Description: 全局组件唯一出口
 * @FilePath: \pc靖凯开源系统项目\jingkaisystem\src\components\index.js
 */
import layout from "./layout/layout"
import moment from "moment"

import pagination from "./pagination"
let myGlobalComponents = {}


myGlobalComponents.install = (Vue) => {
    Vue.component("pagination", pagination)
    Vue.component("layout", layout)
    Vue.prototype.$eventBus = new Vue()
    // 定义一个全局过滤器实现日期格式化
    Vue.filter('datefmt', function (input, fmtstring = "YYYY/MM/DD") {
        return moment(input).format(fmtstring)
    })
}

export default myGlobalComponents